import { Component, OnInit } from '@angular/core';
import {RequestUtil} from "../util/request-util";
import {LogUtil} from "../util/log-util";
import {ResponseUtil} from "../util/response-util";

@Component({
  selector: 'app-samples',
  templateUrl: './samples.component.html',
  styleUrls: ['./samples.component.css']
})
export class SamplesComponent implements OnInit {

  constructor(
    private logUtil : LogUtil,
    private request: RequestUtil,
    private response: ResponseUtil
  ) { }

  ngOnInit() {
    this.test();
  }

  test(){
    this.request.get("api/test").subscribe(
      result => this.response.success(result),
      error => this.response.error(error)
    );
  }
}
